<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>


<template id="tp1">
  <div>
    <slot name="l">默认值：左</slot>
    <slot name="c">默认值：中</slot>
    <slot name="r">默认值：右</slot>
    <slot>无</slot>
  </div>
</template>


<div id="app">
  <cpn>
    <button slot="l">nav-bar</button>

    <span slot="c">标题</span>
    <p slot="r">返回</p>

    <h1>替换无名氏</h1>
  </cpn>
</div>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el:"#app",
    data: {
      message:"stupid mother fucker"
    },
    components:{
      cpn:{
        template:'#tp1'
      }
    }
  })
</script>

</body>
</html>